I have a custom class which extends JPanel and overrides the paintComponent() method. Here's what that looks like: @Override protected void paintComponent(Graphics g) { if(redrawRequested) { g.setColor(ETCH_BACKGROUND_COLOR); g.fillRect(0, 0, owner.getAppWidth(), owner.getAppHeight()); redrawRequested = false; } g.setColor(Color.BLACK); g.fillRect(pointX, pointY, PIXEL_SIZE, PIXEL_SIZE); } The same custom class also implements KeyListener. I am listening for some keys, and more specifically Space which calls a method requestRepaint(). Here's what that method looks like: public void requestRepaint() { redrawRequested = true; revalidate(); repaint(); } My problem is, when the program starts, whats in the if block inside paintComponent get's fired but the fillRect doesn't work(?) …

Member Avatar
Member Avatar
+0 forum 17

So I know in a Tile Based game its more effecient to have static final instances of each tile, then populate your array with those instances. But what about Rendering? You have to pass the position that tile should be rendered into your method you use for rendering. Is there a way for the tile to render from its position in a Tile array? Is passing in a position each render the most effecient way?

Member Avatar
Member Avatar
+0 forum 6

Hi Guys I have a user control created , when i drag and drop it to the form designer, it gets this (error redering control, the file was not found)but it is inside the same project, how to avoid this ? thanks regards sumith

Member Avatar
+0 forum 0

OK, so I've been Googling this as well as looking for previous posts. I have a .NET site that has some classic ASP still in it (who knows why or who did that). On the old server, the ASP would execute normally. On the new server, however, the ASP code renders to the browser. Both servers so far seem setup identically, and are running Windows 2008 R2. I've checked that ASP is installed, the app pools are the same, permissions the same, etc. I have to be missing something, but am not seeing the "smoking gun", as it were. Any …

Member Avatar
Member Avatar
+0 forum 12

Hello, I can get OpenGL to render 3D scenes to the screen, but I want to render them to a pixel array. Basically I want some magical code to fill in the blanks for this code segment: int width=500; int height=500; uint32_t *colours=new uint32_t[width*height]; //Magic code! glBegin(GL_TRIANGLES); //other drawing stuff, preferably no magic here? glEnd(); //Magic code! uint32_t c=*colours;//c should be the top-left pixel rendered by opengl From my research it seems as though I should use a framebuffer object to do this, I am just not sure exactly how they work. Any help?

Member Avatar
Member Avatar
+0 forum 4

Hello, I was partaking in the global game jam (where you have to try to make a game in 48 hours). I got my game pseudo-finished, but I cannot get it to render the scene properly. Here is the code related to the rendering: Code for opengl initialization: glClearColor(0.5f,0.5f,0.5f,1.0f); float ambLight[]={0.5f,0.5f,0.5f,1.0f}; glLightfv(GL_LIGHT1,GL_AMBIENT,ambLight); glEnable(GL_LIGHT1); LoadTextures(); glEnable(GL_TEXTURE_2D); glShadeModel(GL_SMOOTH); glClearDepth(1.0f); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST); Code for opengl drawing (called every frame): glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(FOV,(double)winWidth/(double)winHeight,NEAR_RENDER,FAR_RENDER); glMatrixMode(GL_MODELVIEW); glViewport(0,0,winWidth,winHeight); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glRotatef(dty,1.0f,0.0f,0.0f); glRotatef(dtx,0.0f,1.0f,0.0f); glTranslatef(-x,PLAYER_HEIGHT_STAND, -y); glBindTexture(GL_TEXTURE_2D,wall[level]); glColor3f(1.0f,1.0f,1.0f); //... glBindTexture(GL_TEXTURE_2D,ground); for (int yy=0; yy<mazeDimy; ++yy) { for (int xx=0; xx<mazeDimx; ++xx) { glBegin(GL_QUADS); glTexCoord2f(0.0f,0.0f); glVertex3f(xx*WALL_LENGTH,FLOOR_HEIGHT,yy*WALL_LENGTH); glTexCoord2f(0.0f,1.0f); glVertex3f(xx*WALL_LENGTH,FLOOR_HEIGHT,(yy+1)*WALL_LENGTH); glTexCoord2f(1.0f,1.0f); …

Member Avatar
Member Avatar
+0 forum 8

Hello, I develop a simple script that capture the product using .net WebBrowser control. this is the link http://www.groupon.cl/descuentos/multiple-locations/desde-39900-por-8-sesiones-de-depilacion-ipl-en-axila-rebaje-de-bikini-con-opcion-a-zona-facial-en-estetica-carola-rodriguez-hasta-90-off I have a problem in getting the time in jquery count donw control. Please help me to find a solution. Regards, jeffrey

Member Avatar
Member Avatar
+0 forum 3

Hello, for my Game I used this tutorial from riemers for automatically scalling graphics relative to the current resolution of the game window: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Resolution_independency.php If I change from the baseSize to another resolution the Mouse position gets messed up, I have a custom cursor on (int)ms.x, (int)ms.y but when I move it on a different resolution the real mouse is not at the same position as the custom cursor. Does anyone know a solution to this problem? this is how I draw the cursor: public override void Draw(GameTime gameTime) { MouseState ms = Mouse.GetState(); Game1.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, …

Member Avatar
+0 forum 0

i'm using [CODE]using (Graphics g = Graphics.FromImage(bmp)) { //Set quality to High g.CompositingMode = CompositingMode.SourceCopy; g.CompositingQuality = CompositingQuality.HighQuality; g.SmoothingMode = SmoothingMode.HighQuality; g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; g.PixelOffsetMode = PixelOffsetMode.HighQuality; g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; panel1.DrawToBitmap(bmp, new System.Drawing.Rectangle(0, 0, 2480, 3508));[/CODE] to draw the contents to an image, but the quality of the text is fairly poor.. is there a combination of settings which makes the quality similiar to printing a document from word or similiar programs?..

Member Avatar
Member Avatar
+0 forum 2

i need to print all the contents of my panel to an image. Everything works, except the Rich Text Box's.. I've checked online and i can't get my head around the code as it is fairly advanced. is there any 3rd party components that have this function? i managed to get an image of the control but this isnt what is required as it needs to be added to the panel image in its original X and Y coordinates. richtextbox.drawstring does work, but not with the textbox's original format, as you need to specify the font, size, colour when you …

Member Avatar
Member Avatar
-1 forum 1

So I'm starting up a render farm for UDK and After Effects, and I have about 8 computers at the moment. One of them is a Dell Dimension 2350, and I cannot get the Ethernet to work on it. I've installed this driver: [url]http://support.dell.com/support/topics/global.aspx/support/kcs/document?c=us&cs=19&l=en&s=dhs&docid=DSN_D4A6B1A87E7D2BBBE030A68F27285798&isLegacy=true[/url] Didn't work. I've installed this one: [url]http://support.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=R56237&SystemID=DIM_PNT_CEL_2350&servicetag=&os=WW1&osl=en&deviceid=4316&devlib=0&typecnt=0&vercnt=1&catid=5&impid=-1&formatcnt=0&libid=5&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=66981[/url] And that didn't work aswell, they are both listed as being for the Dimensions 2350. I've also installed the Intel 845GL chipset driver before the ethernet ones. Here are the specs for the PC: [url]http://support.dell.com/support/edocs/SYSTEMS/dim2350/specs.htm#1101572[/url] If anyone has any light to shed, please help. Thanks :)

Member Avatar
Member Avatar
+0 forum 1

Hi, I've noticed some websites don't display their content until everything's been processed, downloaded and ready for render. The result is images [B]DO NOT[/B] render after download, so there're no images popping up everywhere on the page while the page is processing its next request, but wait until it's done and render everything at the same time. I've used image collections (background-positioning), to lessen the amount of requests; the bits of the same UI are displayed simultaneously since they belong to the same collection. If I were to use just one major image collection for everything on the page, it …

Member Avatar
+0 forum 0

Hello does anybody know how to scale a sprite or image to fit the whole render window? at the moment i have my checkers board but its in one corner of the window and i want it to fit the window entirely would be a great help :)

Member Avatar
Member Avatar
+0 forum 3

Hello, I have created an application that passes a Handle of a panel to a DLL which is then used for creating a DirectX or OpenGL render window, all of which works fine. I wish to duplicate what is rendered in the panel elsewhere (basically multiple render windows all rendering the same thing). My approach was to do something along the lines of this: 1. Create a panel (offscreen). 2. Take 'screen shots' of the panel and render them to my render windows (sizing as appropriate). My problem lies with the second step in that I cannot get it to …

Member Avatar
Member Avatar
+0 forum 2

8monkey Labs, creator of the multi-platform Marmoset Engine and shooter game, [I]Darkest of Days[/I], announced a plethora of new features and upgrades to their Marmoset Toolbag...and has invited 3D game artists to try it for free. Marmoset Toolbag is a real-time material editor and presentation tool that allows you see and adjust your project as you go; basically offering a "what you see is what you get" workstation. 8monkey hopes that their program will serve as a stand-alone toolkit to create AAA-presentation quality to 3 models, texture sets and animations. [ATTACH]16046[/ATTACH] [B]Upgrades and New features include[/B]: - HDR image-based environment …

Member Avatar
+0 forum 0

Note: I'm using a JList as an audio playlist. I was wondering if there was a way to automatically update a custom ListCellRenderer. Basically I ask is because within my ListCellRenderer I have an isPlaying item that will change the color of the object in my playlist that is playing, however when the next file begins to play the previous item that was playing will remain the playing color until I highlight it with the focus and then the CellRenderer updates it. Hope I'm explaining this enough to be understood. Maybe you have another idea to go about what I'm …

Member Avatar
Member Avatar
+0 forum 4

The End.