Forum | | | | - Page 1 - |
|  Andreas Gaida | Hi! by me causes glEnableClientState in link with ~ GL_NORMAL_ARRAY a Program crash in XProfan as well as too with Profan2CPP. During The others Arrays itself without Problems enable let power this Ärger what very pity is because in link with glVertexPointer and glDrawArrays is it very quick with draw vieler Objects. i hope so can me of/ one help with the trouble.
If in the example code in the Procedure DrawGLScene the oGL(glEnableClientState,$8075) activate becomes crashes the program immediate with achieve the place ex. as attachment have I a complete Source with obj File appended .the Program reads The obj File one and position The Vertex dar ,The trouble place for Normalen is yet auskommentiert. at that enable this place in the proc DrawGLScene overthrows the program ex . for Help would I very grateful. CompileMarkSeparation
proc DrawGLScene
oGL(Clear)
oGL(Move, 0,-0.2, -1.0)
--------------------- Vierecke zeichnen -----------------------------------------------
oGL(glEnableClientState,$8075) Normale Array aktivieren $8075 = ~GL_NORMAL_ARRAY
oGL(glEnableClientState,$8074) Vertex Array aktivieren $8074 = ~GL_VERTEX_ARRAY
oGL(glNormalPointer,3,$140A,0,vertex_NF4#) Normale Array definieren $140A = ~GL_DOUBLE
oGL(glVertexPointer,3,$140A,0,vertex_VF4#) Vertex Array definieren
oGL(glDrawArrays,~GL_QUADS, 0 ,zähler_VF4&) Vertex Array zeichnen
oGL(glDisableClientState,$8074) glDisableClientState
oGL(glDisableClientState,$8075) Normale Array deaktivieren
--------------------- Dreicke zeichnen -----------------------------------------------
oGL(glEnableClientState,$8075) Normale Array aktivieren $8075
oGL(glEnableClientState,$8074) Vertex Array aktivieren $8074
oGL(glNormalPointer,3,$140A,0,vertex_NF3#) Normale Array definieren
oGL(glVertexPointer,3,$140A,0,vertex_VF3#) Vertex Array definieren
oGL(glDrawArrays,~GL_TRIANGLES, 0 ,zähler_VF3&) Vertex Array zeichnen
oGL(glDisableClientState,$8074) Vertex Array deaktivieren
oGL(glDisableClientState,$8075) Normale Array deaktivieren
---------------------------------------------------------------------------------------
oGL(Show)
GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS, und GL_POLYGON.
endproc
MfG Andreas |
 | | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| | | | | - Page 1 - |
|  | Windowttitle is imaginable unfit to that debuggen - there one sendmessage gesendet becomes. you become so means even not always The wirkliche Absturzstelle find. But if You the Windowtitle More credit schenkst as the real Debugoutput the xpse then go we together past talk must - hiernach can I then but not any more help. 
If you nevertheless my supposition listen want: there glDrawArrays crashes becomes the aray wrong befüllt his.
have The Konstanten not uses because me Profan2CPP The not adopted has.
who with XPSE operates has such Problems not. there's even a extra switch {$cpp}. |
| | | | |
| |  Andreas Gaida | I faith you Yes but I have in the quelltext 2 zeilen ausdokummentiert if both active are stürtzt it already with whom glVertexPointer commands ex it crashes too ex if glDrawArrays ausdokummentiert becomes what against a incorrect placement the befehls speaks or be I there so very on the holzweg
this code should former crash and if man glDrawArrays ausdokummentiert stürtzt it nevertheless ex
could you this part into example insert and it again debugen ? CompileMarkSeparation
proc DrawGLScene
oGL(Clear)
oGL(Move, 0,-0.2, -1.0)
--------------------- Vierecke zeichnen -----------------------------------------------
oGL(glEnableClientState,$8075) Normale Array aktivieren $8075 = ~GL_NORMAL_ARRAY
oGL(glEnableClientState,$8074) Vertex Array aktivieren $8074 = ~GL_VERTEX_ARRAY
oGL(glNormalPointer,3,$140A,0,vertex_NF4#) Normale Array definieren $140A = ~GL_DOUBLE
oGL(glVertexPointer,3,$140A,0,vertex_VF4#) Vertex Array definieren
oGL(glDrawArrays,~GL_QUADS, 0 ,zähler_VF4&) Vertex Array zeichnen
oGL(glDisableClientState,$8074) glDisableClientState
oGL(glDisableClientState,$8075) Normale Array deaktivieren
--------------------- Dreicke zeichnen -----------------------------------------------
oGL(glEnableClientState,$8075) Normale Array aktivieren $8075
oGL(glEnableClientState,$8074) Vertex Array aktivieren $8074
oGL(glNormalPointer,3,$140A,0,vertex_NF3#) Normale Array definieren
oGL(glVertexPointer,3,$140A,0,vertex_VF3#) Vertex Array definieren
oGL(glDrawArrays,~GL_TRIANGLES, 0 ,zähler_VF3&) Vertex Array zeichnen
oGL(glDisableClientState,$8074) Vertex Array deaktivieren
oGL(glDisableClientState,$8075) Normale Array deaktivieren
---------------------------------------------------------------------------------------
oGL(Show)
endproc
|
| | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| |  | Why do You not simply self? 
Gekürzter statement - unteres end is Programmabbruch: CompileMarkSeparationOGL(*Init*, %HWND, 0, 0, 0, 1)
@SET(*oGLDepth*, 1000)
SETTIMER 20
WHILENOT { WHILENOT ENDE% }/* LINE:11 {
WAITINPUT
DRAWGLSCENE
PROCEED PROCEDURE { proc DRAWGLSCENE } /* LINE:16 {
OGL(*Clear*)
OGL(*Move*, 0,-0.2, -1.0)
OGL(*glEnableClientState*,$8075)
OGL(*glEnableClientState*,$8074)
OGL(*glNormalPointer*,3,$140A,0,VERTEX
|
| | | | |
| |  Andreas Gaida | thanks nice . thought me To I with the the debugen on it have would longer last and so siehste too same I my . If I the right see is it means still the glNormalPointer commands the everything stopt .
have You or anyone else a idea wieso the spin it'll well not on OpenGL yourself liegenoder where make I a stupid Error.
otherwise over again viellen Thanks for Help.
MfG Andreas |
| | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| |  | well there's a reason for - The data The You commit are falser structure, you become therefore just a such from you beschriebenen stupid Error make. *g* |
| | | | |
| |  Andreas Gaida | here have I The data for Normalen into same structure brought as the Vertex data but the commands crashes still ex . have The same data as normal uses How for the rectangle ought to but not the program to that crash bring hösten strange looks but the formatierung is the same How tappt im dunkeln with draw the data functions. data go in the daten_init initialized.
So I go too most of it from the the Error me lying but in this drop catch I slow on it To doubt. true but nevertheless very glad above if one me a Error aufzeigen could . CompileMarkSeparationDeclare Dateiname$,Datei$,ab$,rückgabe&,ende%
Declare vertex_P#,vertex_N#,vertex_T#,vertex_VF3#,vertex_VF4#,quad_A#
Declare zähler_P&,zähler_N&,zähler_T&,zähler_F&,zähler_VF3&,zähler_VF4&,vertex_NF3#,vertex_NF4#,zähler_NF4&
cls
daten_init
oGL(Init, %hWnd, 0, 0, 0, 1)
@Set(oGLDepth, 1000)
setTimer 20 max. 50 Frames /sek.
WhileNot ende%
WaitInput
DrawGLScene
EndWhile
ende_init
proc DrawGLScene
oGL(Clear)
oGL(Move, 0,-0.0, -5.0)
--------------------- Vierecke zeichnen -----------------------------------------------
oGL(glEnableClientState,~GL_NORMAL_ARRAY) Normale Array aktivieren $8075 = ~GL_NORMAL_ARRAY
oGL(glEnableClientState,~GL_VERTEX_ARRAY) Vertex Array aktivieren $8074 = ~GL_VERTEX_ARRAY
oGL(glNormalPointer,3,~GL_DOUBLE,0,vertex_NF4#) Normale Array definieren $140A = ~GL_DOUBLE
oGL(glVertexPointer,3,~GL_DOUBLE,0,vertex_NF4#) Vertex Array definieren
oGL(glDrawArrays,~GL_QUADS, 0 ,zähler_VF4&) Vertex Array zeichnen
oGL(glDisableClientState,$8074) glDisableClientState
oGL(glDisableClientState,$8075) Normale Array deaktivieren
oGL(Show)
endproc
proc daten_init
Dim vertex_P# ,240000
Dim vertex_N# ,240000
Dim vertex_T# ,160000
Dim vertex_VF3#,120000
Dim vertex_VF4#,120000
Dim vertex_NF3#,120000
Dim vertex_NF4#,120000
Dim quad_A# ,120000
-------Vertex Array wird gefüllt ein Viereck--------------
Float vertex_VF4#, 0 = 0.0
Float vertex_VF4#, 8 = 1.0
Float vertex_VF4#, 16 = 1.0
Float vertex_VF4#, 24 = 0.0
Float vertex_VF4#, 32 = 0.0
Float vertex_VF4#, 40 = 1.0
Float vertex_VF4#, 48 = 1.0
Float vertex_VF4#, 56 = 0.0
Float vertex_VF4#, 64 = 1.0
Float vertex_VF4#, 72 = 1.0
Float vertex_VF4#, 80 = 1.0
Float vertex_VF4#, 88 = 1.0
zähler_VF4& = 4
-------Normal Vertex Array wird gefüllt---------------------
Float vertex_NF4#, 0 = 0.0
Float vertex_NF4#, 8 = 1.0
Float vertex_NF4#, 16 = 1.0
Float vertex_NF4#, 24 = 0.0
Float vertex_NF4#, 32 = 0.0
Float vertex_NF4#, 40 = 1.0
Float vertex_NF4#, 48 = 1.0
Float vertex_NF4#, 56 = 0.0
Float vertex_NF4#, 64 = 1.0
Float vertex_NF4#, 72 = 1.0
Float vertex_NF4#, 80 = 1.0
Float vertex_NF4#, 88 = 1.0
zähler_NF4& = 4
endproc
proc ende_init
Dispose vertex_P#
Dispose vertex_N#
Dispose vertex_T#
Dispose vertex_VF3#
Dispose vertex_VF4#
Dispose vertex_NF3#
Dispose vertex_NF4#
Dispose_A#
endproc
|
| | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| | | | - Page 2 - |
| |  | CompileMarkSeparationREM ---FILE---
CLS
DATEN_INIT
PROCEED PROCEDURE { proc DATEN_INIT }/* LINE:27 {
DIM VERTEX_P# ,240000
DIM VERTEX_N# ,240000
DIM VERTEX_T# ,160000
DIM VERTEX_VF3#,120000
DIM VERTEX_VF4#,120000
DIM VERTEX_NF3#,120000
DIM VERTEX_NF4#,120000
DIM QUAD_A# ,120000
FLOAT VERTEX_VF4#, 0=0.0
FLOAT VERTEX_VF4#, 8=1.0
FLOAT VERTEX_VF4#, 16=1.0
FLOAT VERTEX_VF4#, 24=0.0
FLOAT VERTEX_VF4#, 32=0.0
FLOAT VERTEX_VF4#, 40=1.0
FLOAT VERTEX_VF4#, 48=1.0
FLOAT VERTEX_VF4#, 56=0.0
FLOAT VERTEX_VF4#, 64=1.0
FLOAT VERTEX_VF4#, 72=1.0
FLOAT VERTEX_VF4#, 80=1.0
FLOAT VERTEX_VF4#, 88=1.0
ZäHLER_VF4&=4
FLOAT VERTEX_NF4#, 0=0.0
FLOAT VERTEX_NF4#, 8=1.0
FLOAT VERTEX_NF4#, 16=1.0
FLOAT VERTEX_NF4#, 24=0.0
FLOAT VERTEX_NF4#, 32=0.0
FLOAT VERTEX_NF4#, 40=1.0
FLOAT VERTEX_NF4#, 48=1.0
FLOAT VERTEX_NF4#, 56=0.0
FLOAT VERTEX_NF4#, 64=1.0
FLOAT VERTEX_NF4#, 72=1.0
FLOAT VERTEX_NF4#, 80=1.0
FLOAT VERTEX_NF4#, 88=1.0
ZäHLER_NF4&=4
}
OGL(*Init*, %HWND, 0, 0, 0, 1)
@SET(*oGLDepth*, 1000)
SETTIMER 20
WHILENOT { WHILENOT ENDE% } /* LINE:10 {
WAITINPUT
DRAWGLSCENE
PROCEED PROCEDURE { proc DRAWGLSCENE } /* LINE:15 {
OGL(*Clear*)
OGL(*Move*, 0,-0.0, -5.0)
OGL(*glEnableClientState*,$8075)
OGL(*glEnableClientState*,$8074)
O NormalPointer*,3,$140A,0,VERTEX_NF4#)
|
| | | | |
| |  Andreas Gaida | THX
but i'm latterly the Error steck somewhere in the commands OGL(*glNormalPointer*,3,$140A,0,VERTEX_NF4#) be of it convincing the The Arrays so far alright are wieso the commands abschmiert no idea but as long as the so is can I OpenGl forget ,The others command are with whom Datenmengen The I for a 3D Animation from obj Files make wished simply To gammy
MfG Andreas |
| | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| |  RGH | Hello Andreas,
I fürchte, you have The Microsoft-Help OpenGL not in detail enough study! glNormalPointer has as a Parameter less:
[...] 
The glNormalPointer function defines on aray of normals.
void glNormalPointer( GLenum type, GLsizei stride, const GLvoid *pointer );
Parameters
type - The data type of each coordinate in the aray using the following symbolic constants: GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and GL_DOUBLE. stride - The byte offset between consecutive normals. When stride is zero, the normals are tightly packed in the aray. pointer - A pointer to the first normal in the aray.
Greeting Roland |
| | | Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/01/07 ▲ |
| |
| |  RGH | Nochmal I:
so goes it means: CompileMarkSeparation
proc DrawGLScene
oGL(Clear)
oGL(Move, 0,-0.0, -5.0)
--------------------- Vierecke zeichnen -----------------------------------------------
oGL(glEnableClientState,~GL_NORMAL_ARRAY) Normale Array aktivieren $8075 = ~GL_NORMAL_ARRAY
oGL(glEnableClientState,~GL_VERTEX_ARRAY) Vertex Array aktivieren $8074 = ~GL_VERTEX_ARRAY
oGL(glNormalPointer,~GL_DOUBLE,0,vertex_NF4#) Normale Array definieren $140A = ~GL_DOUBLE
oGL(glVertexPointer,3,~GL_DOUBLE,0,vertex_NF4#) Vertex Array definieren
oGL(glDrawArrays,~GL_QUADS, 0, zähler_VF4&) Vertex Array zeichnen
oGL(glDisableClientState,$8074)glDisableClientState
oGL(glDisableClientState,$8075) Normale Array deaktivieren
oGL(Show)
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/01/07 ▲ | |
| |
| |  Andreas Gaida | Vielen Thanks !
I must unfortunately admit that I not the Microsoft Help worked have separate whom Quelcode of C from the internet have :
glEnableClientState(GL_COLOR_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(3, GL_FLOAT, 0, color); glTexCoordPointer(2, GL_FLOAT, 0, texcoord); glNormalPointer(3, GL_FLOAT, 0, normal); glVertexPointer(3, GL_FLOAT, 0, vertex);
what itself now unfortunately as one schwerer Error for me erwiesen has . i'll me still rather on Microsoft in future leave. i want me with you and IF over again for Help thank and me for circumstances The I made have entschuldigen .
MfG Andreas |
| | | Athlon X2 4800 , 2GB Ram , GeForce 7800GT Windows XP Pro , XProfan 10 und 11 , Profan2Cpp 1.6b | 06/01/07 ▲ |
| |
| |  | You must you under no circumstance entschuldigen!  |
| | | | |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |