rendering

Thoughts about rendering loop strategies

六眼飞鱼酱① 提交于 2019-12-06 12:03:23
I know that hundreds of variations of these considerations have been posted all over the net. However, I haven't found anything that adresses my exact problem, so I hope you can help me see the light. I'm currently toying with 2D game development in Java using OpenGL. The language and graphics library used is not that relevant to my question though as it has a more general character. I'm attempting to design a general purpose game loop which can be used more or less as is for any game that has moderately heavy graphics (mostly bitmap textures) and possibly even heavier game logic (AI,

How can I visualize that reading element.offsetWidth causes a recalc/reflow

你说的曾经没有我的故事 提交于 2019-12-06 11:54:40
It's written everywhere that reading element.offsetWidth causes a recalculation (or even a reflow?) of the element's dimensions. However, I'm struggling with making this effect visible. In chrome I would expect I would be able to make it visible with 3 simple steps: open the Chrome dev tools Go to the element tab and select an element that you want to cause a recalc/reflow on Go to the timeline tab and start recording Go to the console and type $0.offsetWidth Now if I go to the timeline tab I would assume to see a reflow drawn. However, I see nothing. So I must have gotten something wrong.

Raycasting engine rendering creating slight distortion increasing towards edges of screen

你离开我真会死。 提交于 2019-12-06 11:33:17
问题 I'm developing a basic raycasting engine for HTML5 canvas, of the variety used in games like Wolfenstein 3D and Doom, as a learning exercise / hobby project. I've got to the point where I have walls rendering on the canvas with texture mapping, which is working pretty well after a fair bit of effort getting the intersection testing functions right. I am correcting for the "fishbowl" / "fisheye" distortion effect (caused by increasing distances to intersection points as the angle from the

gstreamer: how to shift the time of rendering of one stream taken from file

℡╲_俬逩灬. 提交于 2019-12-06 11:31:29
I have two media files (say, "file0" and "file1") and I want to merge them into a single one with "picture-in-picture" effect - the content from "file0" to be displayed on the whole window, and the content from "file1" will be shown on the top-left corner in the smaller box. One more point is that the content from "file1" should be rendered some time later from the base time, at the point marked as "X1" on the diagram below. In other words, if I take "videotestsrc" as a video source input, I would get the following sample pipeline which illustrates what I need to get as a result of this task:

Sitecore Controller Rendering DataSource

爷,独闯天下 提交于 2019-12-06 11:26:02
I have a component in Sitecore that can be used in the middle section of the page. It shows a video and is setup as a controller rendering in Sitecore. I have been able to get this to work by setting the DataSource on the rendering on the page item. I have another component for the middle section of the page. This is a list of videos. Each video output has the exact same HTML as the rendering mentioned in the previous paragraph. I'm trying to call the controller rendering (mentioned above) in the rendering for this list rendering something like this - @Html.Sitecore().Controller(

css background is not working when convert template into pdf using rendering plugin

做~自己de王妃 提交于 2019-12-06 10:40:54
I am using rendering plugin to generate pdf in grails. I am using a background color which is prepared by css. code is here. #container #content #mainContent .block .backgroundStyle { background: #ffffff; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI

Box2D: How to manually render a body

99封情书 提交于 2019-12-06 09:22:20
I succeed installing Box2D into my project. But how can I render a body? Assume I'm using something that supports drawing polygons. I just want to find out the current positions of the vertices of the body-polygon, to draw it with the engine. If you can help me, I will be very thankful. I found it!!! void Box2DUtils::DrawBody(SDL_Surface *buffer, b2Body *body, int fr, int fg, int fb, int falpha, int lr, int lg, int lb, int lalpha, bool aa) { const b2Transform& xf = body->GetTransform(); for (b2Fixture* f = body->GetFixtureList(); f; f = f->GetNext()) { switch (f->GetType()) { case b2Shape::e

.png images not rendering correctly in IE7, IE8

走远了吗. 提交于 2019-12-06 08:56:48
问题 They look great in FF, Safari, but the social media icons don't render correctly in IE. http://www.erisdesigns.net/STAGE/ED1.3/ Is this an IE problem, or something to do with how I'm creating the .pngs? 回答1: I think that it's because you use transparency. Although it isn't as clean as the current solution, you should maybe make everything opaque. 回答2: There's a pngfix javascript add-on you can trigger with an IE conditional statement. PngFix <!--[if lt IE 7.]> 来源: https://stackoverflow.com

Copy ffmpeg d3dva texture resource to shared rendering texture

隐身守侯 提交于 2019-12-06 08:55:54
问题 I'm using ffmpeg to decode video via d3dva based on this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c. I'm able to succesfully decode video. What I need to do next is to render decoded NV12 frame. I have created directx rendering texture based on this example https://github.com/balapradeepswork/D3D11NV12Rendering and set it as shared. D3D11_TEXTURE2D_DESC texDesc; texDesc.Format = DXGI_FORMAT_NV12; // Pixel format texDesc.Width = width; // Width of the video

WPF Text rendering problem

江枫思渺然 提交于 2019-12-06 08:51:12
I created a custom control similar to TabControl. It works nice, except that the text in header items gets blury when I resize the content. It can, for example look like this: Not only the text, but the box around the text can also get non-vertical. See the blue border around the "General" item: What is causing this problem? I have set SnapToDevicePixels = True. Thanks for any ideas! EDIT : I'm using .NET 4.0. TextOptions.TextFormattingMode is set to "Display". The whole problem with fuzzy text and background occurs if I apply a DropShadowEffect effect in the style for ItemsControl which