Jump to content
  • Advertisement

kikosmalltalk

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

126 Neutral

About kikosmalltalk

  • Rank
    Newbie
  1. Hi all I'm reading the book "Beginning OpenGL game programming". This book have any examples that have memory leak. Here the code of the example7 and 8. http://www.mediafire.com/?4wyhibjwnfcrwrv I'm using GLIntercept with the example 7 "Terrain". Here the gllog: GL Intercept Log. Version : 1.0 Compile Date: Feb 10 2010 Run on: Thu Nov 11 17:41:19 2010 =================================================== Token ->ProfileName not accessed in the configuration file Token ->ProfileDescription not accessed in the configuration file InterceptDisplayList::CreateListPre - Attempt to end a list while not compiling a list glEndList called whithout a glNewList GL ERROR - Function glEndList generated error GL_INVALID_OPERATION InterceptDisplayList::CreateListPre - Attempt to end a list while not compiling a list glEndList called whithout a glNewList GL ERROR - Function glEndList generated error GL_INVALID_OPERATION ImageManager::Destructor - OpenGL id 1 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 2 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 3 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 4 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 5 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 6 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 7 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 8 is still active. (Image Memory leak?) =================================================== Log End. Here the glInterceptLog. http://www.mediafire.com/?uwewyx9rsl1v7df The error is in this method: void CGfxOpenGL::DrawTerrain() { // draw the terrain glBindTexture(GL_TEXTURE_2D, m_grassTexture); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); for (int z = 0; z < TERRAIN_SIZE - 1; ++z) { glBegin(GL_TRIANGLE_STRIP); for (int x = 0; x < TERRAIN_SIZE; ++x) { // render two vertices of the strip at once float scaledHeight = heightmap[z * TERRAIN_SIZE + x] / SCALE_FACTOR; float nextScaledHeight = heightmap[(z + 1)* TERRAIN_SIZE + x] / SCALE_FACTOR; float color = 0.5f + 0.5f * scaledHeight / MAX_HEIGHT; float nextColor = 0.5f + 0.5f * nextScaledHeight / MAX_HEIGHT; glColor3f(color, color, color); glTexCoord2f((GLfloat)x/TERRAIN_SIZE*8, (GLfloat)z/TERRAIN_SIZE*8); glVertex3f(static_cast<GLfloat>(x - TERRAIN_SIZE/2), scaledHeight, static_cast<GLfloat>(z - TERRAIN_SIZE/2)); glColor3f(nextColor, nextColor, nextColor); glTexCoord2f((GLfloat)x/TERRAIN_SIZE*8, (GLfloat)(z+1)/TERRAIN_SIZE*8); glVertex3f(static_cast<GLfloat>(x - TERRAIN_SIZE/2), nextScaledHeight, static_cast<GLfloat>(z + 1 - TERRAIN_SIZE/2)); } glEnd(); } //draw the water glBindTexture(GL_TEXTURE_2D, m_waterTexture); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBegin(GL_QUADS); glTexCoord2f(0.0, 0.0); glVertex3f(-TERRAIN_SIZE/2.1f, WATER_HEIGHT, TERRAIN_SIZE/2.1f); glTexCoord2f(TERRAIN_SIZE/4.0f, 0.0); glVertex3f(TERRAIN_SIZE/2.1f, WATER_HEIGHT, TERRAIN_SIZE/2.1f); glTexCoord2f(TERRAIN_SIZE/4.0f, TERRAIN_SIZE/4.0f); glVertex3f(TERRAIN_SIZE/2.1f, WATER_HEIGHT, -TERRAIN_SIZE/2.1f); glTexCoord2f(0.0, TERRAIN_SIZE/4.0f); glVertex3f(-TERRAIN_SIZE/2.1f, WATER_HEIGHT, -TERRAIN_SIZE/2.1f); glEnd(); } If I cancel this method the example work OK. Any idea ? Which is the error? With the example 8 happen the same Advanced thanks kiko
  2. kikosmalltalk

    GLIntercept messages ?

    Hi grey Are you trying to use GLIntercept as some kind of debugger? Yes. My experience with it is that you cannot always trust the logfile output. Why ? I am experiencing a strange problem with textures Look this topic: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&topic=54591&gonew=1 I think it's a memory leak. But I can not confirm . This are other messages from GLIntercept: DisplayListManager::RemoveData - Attempting to delete unknown DisplayList ID 95 DisplayListManager::RemoveData - Attempting to delete unknown DisplayList ID 96 GLDriver::DeleteOpenGLContext - Deleting current context 0x110000? ImageManager::Destructor - OpenGL id 1 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 2 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 3 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 4 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 5 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 6 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 7 is still active. (Image Memory leak?) ImageManager::Destructor - OpenGL id 8 is still active. (Image Memory leak?) InterceptDisplayList::CallLists - Calling non-existant list? 39 InterceptDisplayList::CallLists - Calling non-existant list? 49 THIS : ImageManager::Destructor - OpenGL id 1 is still active. (Image Memory leak?) Means a memory leak? Or possible memory leak? Look this image: http://www.imagenserver.com.ar/show.php/17407_shell.JPG.html When I select a new example , always call to glDeleteTextures and destroy the render context, but the VRAM is not cleaned !. any idea ? Advanced thanks kiko
  3. Hi all I implement a single demo on Dolphin Smalltalk. I am using GLIntercept and this message returns: InterceptDisplayList::CallLists - Calling non-existant list? 39 InterceptDisplayList::CallLists - Calling non-existant list? 49 InterceptDisplayList::CallLists - Calling non-existant list? 52 InterceptDisplayList::CallLists - Calling non-existant list? 27 DisplayListManager::RemoveData - Attempting to delete unknown DisplayList ID 96 GLDriver::DeleteOpenGLContext - Deleting current context 0x20000? What does this mean? Which is the error? Advanced thanks kiko
  4. Hi all I'm implementing some OpenGL examples in dolphin smalltalk for Window XP. The examples are from the book: "Beginning OpenGL game programming". (Dave Astle. Kevin Hawkins) The first examples work ok , but the texture examples don't work well !. Look this screens: First: I load the example working well Second: I load other example and work well Third: I load again the first example and happen this: Look at the texture of the first polygon, this texture it is the same of the second example!. But the second example is dead and the textures are eliminated I use glCheckError in all function call and all work well. The strange thing is that this behavior is aleatory. I suspect that the problem can be related with: 1) The texture settings. 2) The delete of the textures 3) The opengl context settings. The problem is that my example is the same like the C++ example. Any idea ? Advanced thanks kiko PD: Here more screens
  5. kikosmalltalk

    OpenGL Untitled

    Hi all I'm implementing some OpenGL examples in dolphin smalltalk for Window XP. The examples are from the book: "Beginning OpenGL game programming". (Dave Astle. Kevin Hawkins) The first examples work ok , but the texture examples don't work well !. Look this screens: First: I load the example working well Second: I load other example and work well Third: I load again the first example and happen this: Look at the texture of the first polygon, this texture it is the same of the second example!. But the second example is dead and the textures are eliminated I use glCheckError in all function call and all work well. The strange thing is that this behavior is aleatory. I suspect that the problem can be related with: 1) The texture settings. 2) The delete of the textures 3) The opengl context settings. The problem is that my example is the same like the C++ example. Any idea ? Advanced thanks kiko PD: Here more screens
  6. kikosmalltalk

    Terrain deform algorithms ?

    Hi all thanks to reply, sorry for the delay. My problem is solved. http://www.imagenserver.com.ar/show.php/13109_image.JPG.html kiko
  7. kikosmalltalk

    Terrain deform algorithms ?

    Hi all I want to make a brush to deform terrain like Unity Engine. look image: http://www.imagenserver.com.ar/show.php/13036_image.JPG.html Unity like other terrain editors use a image for the brush, but I not understand that algorithm/technique him use. I search "terrain deform algorithms" in google, but not found nothing. In the forum, I found this topic: http://www.gamedev.net/community/forums/topic.asp?topic_id=138833 , but nothing over deform algorithm. Does somebody know that algorithms are used? For deform like Unity engine, any idea Advanced thanks kiko
  8. Hi all I'm kiko from argentina and this is my first topic. I'm working in my terrain editor with TrueVision3D and Dolphin Smalltalk. I implement two brushes , square and circulate. With two modes, flatted and lower-raised, as PnP TErrain Creator. Now, I want to implement the two modes more difficult of PnP Terrain Creator: Look the screenshots: http://www.idivimage.com/show.php/7470_mode1.JPG.html http://www.idivimage.com/show.php/7471_mode2.JPG.html Somebody had implemented something like this ? Or does somebody have idea of as making this? For my square brush , for example I make this: SquareBrush>>loweredRaised: anITVLandscape in: aRectangle "Lowered / Raised the ITVLandscape in aRectangle " aRectangle left to: aRectangle right by: self precision do: [:x | aRectangle top to: aRectangle bottom by: self precision do: [:z | anITVLandscape setHeight: x fZ: z fNewHeight: (anITVLandscape getHeight: x fZ: z) + deltaY]]. I don't find the form of making the same thing that makes " PnP Terrain creator brush". Any idea ?. Advanced thanks kiko PD: Sorry for my English, is not very good.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!