Basically I would like to do my $tex = SDLx::POGL::Tex->new( w => 20, h => 10 );
$tex->attach( mesh => $mesh, u => 1, v => 1, n => -1 ); #SDLx::POGL::Tex isa SDLx::Surface too $tex->draw_circle( ...) $tex->update() # rendered in opengl on the fly now. Kartik Thakore On 2011-10-04, at 12:59 PM, Chris Marshall <devel.chm...@gmail.com> wrote: > Hi Kartik- > > I took a look at the SDL module on http://search.cpan.org > to see if I could understand what was meant by updating > an SDL surface to update a texture. I couldn't find the version > requirement for the SDL library underneath. > > Anyway, I'm currently working some visualization problems > that involve rendering to a texture from an image buffer or > PDL. That sounds like it could be related to your work. > If you have a chance, could you give an example of what > you want to have happen? > > I figure I'll try another Alien::SDL soon to get started and > maybe I'll be able to understand more when I can use the > module myself. > > Cheers, > Chris > > On Sun, Oct 2, 2011 at 8:35 AM, chm <devel.chm...@gmail.com> wrote: >> On 10/1/2011 6:32 PM, My wrote: >>> >>> i want to be able to tell opengl that I will >>> be using SDL and have it turn off GLUT. >> >> As I mentioned, GLUT/FreeGLUT is only needed for the >> current build process. There is nothing to turn off >> after that point, just use or do not use GLUT features. >> >>> Also I wanted to make a SDL pixels to OpenGL data >>> interface so updating a SDL surface would update >>> OpenGL textures. >> >> There are a lot of ways to update a texture via >> the OpenGL API as well as ways to render the >> texture. The POGL bindings have support for >> OpenGL up through version 2.1 (approximately) >> although some partial support for shader >> language is present. >> >> You can find some online references to the OpenGL >> API at http://www.opengl.org including docs by >> OpenGL version and other information. I can >> recommend the "OpenGLĀ® SuperBible: Comprehensive >> Tutorial and Reference (4th Edition)" for good >> coverage of both the fixed-function pipeline >> supported by POGL at the moment and coverage >> of the "new wave" via shader language and >> texture unit programming. Be sure to get the >> 4th edition as the 5th edition no longer has >> any information on the old-style opengl pipeline. >> >> Hope this helps, >> Chris >> >>> On 2011-10-01, at 6:03 PM, chm<devel.chm...@gmail.com> wrote: >>> >>>> On 10/1/2011 4:04 PM, Kartik Thakore wrote: >>>>> >>>>> Hey Chris, >>>>> >>>>> How do I make SDL an interface for POGL? >>>>> >>>>> >>>>> https://github.com/PerlGameDev/POGL/commit/4ed41515474f67cb2af553be9cf0132741594a40 >>>>> >>>>> I want to turn off GLUT and all that when SDL is chosen. >>>> >>>> The easiest way it to just ignore the glut stuff. >>>> The current build uses GLUT/FreeGLUT to build but >>>> after that you can use all the OpenGL and GLU >>>> stuff independent of your choice for window/context >>>> creation. >>>> >>>> My current plan is to refactor the POGL build to >>>> use GLEW (or GLee) to generate the OpenGL bindings >>>> and to implement some convenience routines/methods >>>> to simplify use of the routines from other GUIs and >>>> their window+context environments. >>>> >>>> I thought SDL already had support for creating >>>> windows with OpenGL contexts in them? If so >>>> you just create the context and then use the >>>> POGL bindings to the OpenGL API to do your >>>> drawing... >>>> >>>>> Also in the TODO I noticed you wanted: >>>>> >>>>> >>>>>> https://github.com/PerlGameDev/POGL/blob/SDL_interface/TODO#L28 >>>>> >>>>> common macro in one place. >>>>> >>>>> In SDL we put this in one header, would that work? >>>> >>>> Yes, but the challenge is the legacy code and >>>> untangling the various macro constructs and reordering >>>> which not breaking anything. I've started to look >>>> at the GLEW stuff and I think some of the mess will >>>> go away with the new approach (e.g., all constants >>>> will be real perl constants, and all bindings will >>>> be generated from the core GLEW headers which should >>>> help keep things up-to-date and error free). >>>> >>>> What do you need to do that you cannot already >>>> do with SDL+POGL OpenGL? >>>> >>>> --Chris >>> >>> >>> ----- >>> No virus found in this message. >>> Checked by AVG - www.avg.com >>> Version: 10.0.1410 / Virus Database: 1520/3931 - Release Date: 10/01/11 >>> >>> >>> >> >>